<!DOCTYPE html>
<html>
<head>
    <title>小米体脂称健康数据</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
		        <i-col span="4" style="padding-right:10px">
		            <i-select v-model="q.userId" filterable @on-change="selectUser"	>
		                <i-option v-for="item in userList" :value="item.id" :key="item.id">{{ item.username }}</i-option>
		            </i-select>
		        </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("mihealthdata:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("mihealthdata:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("mihealthdata:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="miHealthData" :rules="ruleValidate" :label-width="80">
            <Form-item label="会员" prop="userId" >
		        <i-col span="12" style="padding-right:10px">
		            <i-select v-model="miHealthData.userId" filterable @on-change="selectUserEdit"	>
		                <i-option v-for="item in userList" :value="item.id" :key="item.id">{{item.username}}</i-option>
		            </i-select>
		        </i-col>
            </Form-item>
            <Row>
                <i-col span="16">
                    <Form-item label="小米分享图上传" prop="miPic">
                        <i-input v-model="miPic" placeholder="小米分享图上传" />
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" :action="UploadMiPicUrl"  :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessPic" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
            </Row>                    
            <Form-item label="身体得分" prop="score">
                <i-input v-model="miHealthData.score" placeholder="身体得分"/>
            </Form-item>
            <Form-item label="称重时间" prop="createDate">
                <i-input v-model="miHealthData.createDate" placeholder="称重时间"/>
            </Form-item>
            <Form-item label="体重" prop="weight">
                <i-input v-model="miHealthData.weight" placeholder="体重"/>
            </Form-item>
            <Form-item label="体重描述" prop="weightDesc">
                <i-input v-model="miHealthData.weightDesc" placeholder="体重描述"/>
            </Form-item>
            <Form-item label="体型指标" prop="weightTarget">
                <i-input v-model="miHealthData.weightTarget" placeholder="体型指标"/>
            </Form-item>
            <Form-item label="BMI" prop="bmi">
                <i-input v-model="miHealthData.bmi" placeholder="BMI"/>
            </Form-item>
            <Form-item label="BMI描述" prop="bmiDesc">
                <i-input v-model="miHealthData.bmiDesc" placeholder="BMI描述"/>
            </Form-item>
            <Form-item label="BMI达标情况" prop="bmiExplain">
                <i-input v-model="miHealthData.bmiExplain" placeholder="BMI达标情况"/>
            </Form-item>
            <Form-item label="体脂" prop="bodyfat">
                <i-input v-model="miHealthData.bodyfat" placeholder="体脂"/>
            </Form-item>
            <Form-item label="体脂描述" prop="bodyfatDesc">
                <i-input v-model="miHealthData.bodyfatDesc" placeholder="体脂描述"/>
            </Form-item>
            <Form-item label="体脂达标情况" prop="bodyfatExplain">
                <i-input v-model="miHealthData.bodyfatExplain" placeholder="体脂达标情况"/>
            </Form-item>
            <Form-item label="人体水分" prop="bodyWater">
                <i-input v-model="miHealthData.bodyWater" placeholder="人体水分"/>
            </Form-item>
            <Form-item label="人体水分描述" prop="bodyWaterDesc">
                <i-input v-model="miHealthData.bodyWaterDesc" placeholder="人体水分描述"/>
            </Form-item>
            <Form-item label="人体水分达标情况" prop="bodyWaterExplain">
                <i-input v-model="miHealthData.bodyWaterExplain" placeholder="人体水分达标情况"/>
            </Form-item>
            <Form-item label="蛋白质" prop="protein">
                <i-input v-model="miHealthData.protein" placeholder="蛋白质"/>
            </Form-item>
            <Form-item label="蛋白质描述" prop="proteinDesc">
                <i-input v-model="miHealthData.proteinDesc" placeholder="蛋白质描述"/>
            </Form-item>
            <Form-item label="蛋白质达标情况" prop="proteinExplain">
                <i-input v-model="miHealthData.proteinExplain" placeholder="蛋白质达标情况"/>
            </Form-item>
            <Form-item label="基础代谢（千卡）" prop="basalMetabolism">
                <i-input v-model="miHealthData.basalMetabolism" placeholder="基础代谢（千卡）"/>
            </Form-item>
            <Form-item label="基础代谢描述" prop="basalMetabolismDesc">
                <i-input v-model="miHealthData.basalMetabolismDesc" placeholder="基础代谢描述"/>
            </Form-item>
            <Form-item label="基础代谢达标情况" prop="basalMetabolismExplain">
                <i-input v-model="miHealthData.basalMetabolismExplain" placeholder="基础代谢达标情况"/>
            </Form-item>
            <Form-item label="肌肉" prop="muscle">
                <i-input v-model="miHealthData.muscle" placeholder="肌肉"/>
            </Form-item>
            <Form-item label="肌肉描述" prop="muscleDesc">
                <i-input v-model="miHealthData.muscleDesc" placeholder="肌肉描述"/>
            </Form-item>
            <Form-item label="肌肉达标情况" prop="muscleExplain">
                <i-input v-model="miHealthData.muscleExplain" placeholder="肌肉达标情况"/>
            </Form-item>
            <Form-item label="内脏脂肪" prop="visceralFat">
                <i-input v-model="miHealthData.visceralFat" placeholder="内脏脂肪"/>
            </Form-item>
            <Form-item label="内脏脂肪描述" prop="visceralFatDesc">
                <i-input v-model="miHealthData.visceralFatDesc" placeholder="内脏脂肪描述"/>
            </Form-item>
            <Form-item label="内脏脂肪达标情况" prop="visceralFatExplain">
                <i-input v-model="miHealthData.visceralFatExplain" placeholder="内脏脂肪达标情况"/>
            </Form-item>
            <Form-item label="骨量" prop="boneMass">
                <i-input v-model="miHealthData.boneMass" placeholder="骨量"/>
            </Form-item>
            <Form-item label="骨量描述" prop="boneMassDesc">
                <i-input v-model="miHealthData.boneMassDesc" placeholder="骨量描述"/>
            </Form-item>
            <Form-item label="骨量达标情况" prop="boneMassExplain">
                <i-input v-model="miHealthData.boneMassExplain" placeholder="骨量达标情况"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/shop/mihealthdata.js?_${date.systemTime}"></script>
</body>
</html>